package com.jic.order.service;

import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.order.entity.*;
import com.jic.order.manage.response.OrderResponse;
import com.jic.order.model.entity.MOrderBale;
import com.jic.order.request.OrderNoPage;
import com.jic.order.request.OrderQueryPage;
import com.jic.order.request.OrderStatisticsRequest;
import com.jic.order.request.OrderTagRequest;
import com.jic.order.response.OrderClosedInfo;
import com.jic.order.response.OrderInfo;
import com.jic.order.response.OrderInvoceInfo;
import com.jic.order.response.OrderMarkInfo;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* 订单服务
* @author : yinhaijun
* @email :
* @since : 2020-01-13 06:17:06
* @version : v1.0.0
*/
public interface OrderService {

    /** 查询订单分页
     * @return*/
    PageResult<Order> queryPage(OrderQueryPage orderQueryPage);
    PageInfo<Order> queryPageOrder(OrderQueryPage orderQueryPage);

    RestResult<OrderInfo> info(String orderNo);

    RestResult<PageResult<OrderGoods>> queryOrderGoods(OrderNoPage orderNoPage);

    RestResult<PageResult<OrderProcessLog>> orderProcessLogQuery(OrderNoPage orderNoPage);

    RestResult<OrderClosedInfo> orderClosedInfoQuery(OrderNoPage orderNoPage);

    RestResult<OrderMarkInfo> markQuery(OrderNoPage orderNoPage);

    RestResult modifyFlag(OrderTagRequest orderTagRequest);

    RestResult<OrderInvoceInfo> invoiceQuery(OrderNoPage orderNoPage);

    RestResult<PageResult<OrderPayDetail>> orderPayDetailQuery(OrderNoPage orderNoPage);

    RestResult<PageResult<OrderAfterSaleApplyModel>> orderAfterSaleApplyQuery(OrderNoPage orderNoPage);


    RestResult<MOrderBale> getParcel(String orderNo);

    RestResult<Map<String, Long>> queryFirstPaymentCount(OrderStatisticsRequest request);

    RestResult<Map<String, Long>> queryOrderCount(OrderStatisticsRequest request);

    RestResult<Map<String, Map<String,Object>>> queryOrderGmv(OrderStatisticsRequest request);
    List<JSONObject> queryMOrderByDate(JSONObject jsonObject);

    List<JSONObject> queryOrderByOrderNo(String orders);

    long insert(Order order);

    long delete(Long id);

    long update(Order order);

    Integer updateByOrderNo(JSONObject jsonObject);

    Integer insertOrderSettlement(JSONObject jsonObject);

    Integer updateOrderSettlement(JSONObject jsonObject);

    Integer insertScoreRecord(JSONObject ret);

    Integer updateScoreRecord(JSONObject ret);

    RestResult<List<JSONObject>> querySubmitOrderUserLeft(OrderStatisticsRequest request);

    List<OrderResponse> queryBycommodityCode(String commodityCode, Date settStartTime, Date settEndTime);

    List<OrderResponse> queryBycommodityCodeNumber(String commodityCode, Date settStartTime, Date settEndTime);
}
